﻿<%@ Page Title="" Language="C#" MasterPageFile="~/NewTemplate.Master" AutoEventWireup="true"
    CodeBehind="Profile.aspx.cs" Inherits="PresentationLayer.Profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
    <title>Profile</title>
    <style type="text/css">
        .EventBox
        {
            width:620px;
            margin-top:10px;
            z-index: 1;
            
            margin-left: -8px;
        }
        .slideHeader
        {
	        cursor:pointer;
	        
	        padding-left: 15px;
	        padding-right: 15px;
	        width:590px;
	        height: 38px;
            background-image: url('VisualDesign/DropDownElements/drop_down_element_headbar.png');
            background-repeat: no-repeat;
            background-position: center;
            color: #ffffff;
            font-size: 18px;
            font-weight: bold;
            padding-top: 2px;
            position: relative;
            bottom: -11px;
            z-index: 100;
        }
        .slideHeader img
        {
            margin-top: 5px;
            float: right;
        }
        .slideContainer
        {
	        visibility: hidden;
	        height:1px; 
	        overflow:hidden;
	        display:none;
	        
	        width: 620px;
	        background-image: url('VisualDesign/DropDownElements/table_background.png');
	        background-repeat: repeat-y;
        }
        .slideContent
        {
            padding: 1px;
	        position: relative;
        }
        .EventTable 
        {
            margin-left: auto;
            margin-right: auto;
            margin-top:10px;
            margin-bottom:10px;
            width:592px;
            border-collapse: collapse;
        }
        .TableHeader 
        {
            width:590px;
            height:24px;
            background-image: url('VisualDesign/DropDownElements/button_GoUp_up.png');
            background-repeat:no-repeat;
            cursor: pointer;
        }
        .ColumnTitle 
        {
            height: 24px;
            font-size:14px;
            font-weight: bold;
            text-transform: uppercase;
            text-align: center;
            background-color: #bbbbbb;
            color: #ffffff;
        }
        .ColumnTitle:hover 
        {
            background-color: #0099CC;
            cursor: pointer;
        }
        .TableRow
        {
            background-color: #DCDCDC;
            color: #000000;
           
        }
        .TableRow:hover
        {
            background-color: #0099CC;
             cursor: pointer;
        }
        .TableFooter
        {
            width:590px;
            height:24px;
            background-image: url('VisualDesign/DropDownElements/button_GoDown_up.png');
            background-repeat:no-repeat;
            cursor: pointer;
        }
        #DataPagerContainerHeader
        {
            top:3px;
            position:relative;
            left:13px;
                                  
        }
         #DataPagerContainerFooter
        {
           
            position:relative;
            left:13px;                       
        }
    </style>
    <script type="text/javascript">
        function viewevent(id) {
            
            window.location = "ViewEvent.aspx?id=" + id
        }

</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlace" runat="server">
    <h1>Home</h1>

    <div class="EventBox" >
        <div class="slideHeader" id="slideHeader_myEvents" onclick="changeArrow(this.id);showHideContent(this.id);">
            <span>My events</span>
            <img src="VisualDesign/DropDownElements/expand_arrow.png" alt="" />
        </div>
        <div class="slideContainer" id="slideContainer_myEvents">
            <div class="slideContent" id="slideContent_myEvents">
            <br/>
                <asp:ObjectDataSource ID="MyEventsSource" runat="server" SelectMethod="GetMyEvents"
                    TypeName="PresentationLayer.Profile"></asp:ObjectDataSource>
                <asp:ListView ID="MyEventsView" runat="server" DataSourceID="MyEventsSource">
                    <ItemTemplate>
                
                        <tr class="TableRow"  onclick="viewevent('<%# Eval("idevent") %>')"  >
                            <td>
                               <p><%# Eval("Name") %> </p>
                               <p><asp:Label ID="Location" runat="server" Text="" idevent=<%# Eval("idevent") %>   OnPreRender="GetFinalLocation" ClientIDMode="Static" /></p>
                             
                            </td>
                            <td>
                                <p><asp:Label ID="Time" runat="server" Text="" idevent=<%# Eval("idevent") %>  OnPreRender="GetFinalTime" ClientIDMode="Static" /></p>
                                <p><asp:Label ID="Date" runat="server" Text="" idevent=<%# Eval("idevent") %>   OnPreRender="GetFinalDate" ClientIDMode="Static" /></p>
                             
                            </td>
                            <td>
                                <asp:Label ID="Invited" runat="server" Text='0' idevent=<%# Eval("idevent") %> OnPreRender="NumInvited" />
                            </td>
                            <td>
                                <asp:Label ID="Attend" runat="server" Text='0' idevent=<%# Eval("idevent") %> OnPreRender="NumAttending" />
                            </td>
                        </tr>
                     
                    </ItemTemplate>
                    <LayoutTemplate>
                    <div id="DataPagerContainerHeader">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="2">
                            <Fields>
                                <asp:NextPreviousPagerField PreviousPageText="<img src='VisualDesign/DropDownElements/button_GoUp_up.png' onMouseOver=this.src='VisualDesign/DropDownElements/button_GoUp_over.png'  onMouseOut=this.src='VisualDesign/DropDownElements/button_GoUp_up.png' />"
                                    ButtonType="Link" ShowNextPageButton="false" ShowPreviousPageButton="true" />
                            </Fields>
                        </asp:DataPager>
                        </div>
                        <table id="itemPlaceholderContainer" runat="server" class="EventTable" border="1">
                            <tr id="Tr1" runat="server" style="background-color: #DCDCDC; color: #000000;">
                                <th id="Th1" runat="server">
                                    <div class='ColumnTitle'>
                                        Name
                                    </div>
                                </th>
                                <th id="Th2" runat="server">
                                    <div class='ColumnTitle'>
                                        Details
                                    </div>
                                </th>
                                <th id="Th3" runat="server">
                                    <div class='ColumnTitle'>
                                        Inv
                                    </div>
                                </th>
                                <th id="Th4" runat="server">
                                    <div class='ColumnTitle'>
                                        Att
                                    </div>
                                </th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                        <div id="DataPagerContainerFooter"> 
                        <asp:DataPager ID="DataPager2" runat="server" PageSize="2">
                            <Fields>
                                <asp:NextPreviousPagerField NextPageText="<img runat='server' src='VisualDesign/DropDownElements/button_GoDown_up.png' onMouseOver=this.src='VisualDesign/DropDownElements/button_GoDown_over.png'  onMouseOut=this.src='VisualDesign/DropDownElements/button_GoDown_up.png' />"
                                    ButtonType="Link" ShowNextPageButton="true" ShowPreviousPageButton="false" />
                            </Fields>
                        </asp:DataPager>
                        </div>
                    </LayoutTemplate>
                </asp:ListView>
                <br/>
            </div>
    </div>
    </div>
    <div class="EventBox">
        <div class="slideHeader" id="slideHeader_attendingEvents" onclick="changeArrow(this.id);showHideContent(this.id);">
            <span>Events I attend</span>
            <img src="VisualDesign/DropDownElements/expand_arrow.png" alt="" />
        </div>
       
        <div class="slideContainer" id="slideContainer_attendingEvents"> 
            <div class="slideContent"  id="slideContent_attendingEvents">
            <br/>
                <asp:ObjectDataSource ID="MyAttendEventsSource" runat="server" SelectMethod="GetMyAttendingEvents"
                    TypeName="PresentationLayer.Profile"></asp:ObjectDataSource>
                <asp:ListView ID="ListView2" runat="server" DataSourceID="MyAttendEventsSource">
                    <ItemTemplate>
                        <tr class="TableRow"  onclick="viewevent('<%# Eval("idevent") %>')">
                            <td>
                               <p><%# Eval("Name") %> </p>
                               <p><asp:Label ID="Location" runat="server" Text="" idevent=<%# Eval("idevent") %>   OnPreRender="GetFinalLocation" ClientIDMode="Static" /></p>
                             
                            </td>
                            <td>
                                <p><asp:Label ID="Time" runat="server" Text="" idevent=<%# Eval("idevent") %>   OnPreRender="GetFinalTime" ClientIDMode="Static" /></p>
                                <p><asp:Label ID="Date" runat="server" Text="" idevent=<%# Eval("idevent") %>   OnPreRender="GetFinalDate" ClientIDMode="Static" /></p>
                             
                            </td>
                            <td>
                                <asp:Label ID="Invited" runat="server" Text='0' idevent=<%# Eval("idevent") %> OnPreRender="NumInvited" />
                            </td>
                            <td>
                                <asp:Label ID="Attend" runat="server" Text='0' idevent=<%# Eval("idevent") %> OnPreRender="NumAttending" />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <LayoutTemplate>
                    <div id="DataPagerContainerHeader">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="2">
                            <Fields>
                                <asp:NextPreviousPagerField PreviousPageText="<img src='VisualDesign/DropDownElements/button_GoUp_up.png' onMouseOver=this.src='VisualDesign/DropDownElements/button_GoUp_over.png'  onMouseOut=this.src='VisualDesign/DropDownElements/button_GoUp_up.png' />"
                                    ButtonType="Link" ShowNextPageButton="false" ShowPreviousPageButton="true" />
                            </Fields>
                        </asp:DataPager>
                        </div>
                        <table id="itemPlaceholderContainer" runat="server" class="EventTable" border="1">
                            <tr id="Tr1" runat="server" style="background-color: #DCDCDC; color: #000000;">
                                <th id="Th1" runat="server">
                                    <div class='ColumnTitle'>
                                        Name
                                    </div>
                                </th>
                                <th id="Th2" runat="server">
                                    <div class='ColumnTitle'>
                                        Details
                                    </div>
                                </th>
                                <th id="Th3" runat="server">
                                    <div class='ColumnTitle'>
                                        Inv
                                    </div>
                                </th>
                                <th id="Th4" runat="server">
                                    <div class='ColumnTitle'>
                                        Att
                                    </div>
                                </th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                        <div id="DataPagerContainerFooter"> 
                        <asp:DataPager ID="DataPager2" runat="server" PageSize="2">
                            <Fields>
                                <asp:NextPreviousPagerField NextPageText="<img runat='server' src='VisualDesign/DropDownElements/button_GoDown_up.png' onMouseOver=this.src='VisualDesign/DropDownElements/button_GoDown_over.png'  onMouseOut=this.src='VisualDesign/DropDownElements/button_GoDown_up.png' />"
                                    ButtonType="Link" ShowNextPageButton="true" ShowPreviousPageButton="false" />
                            </Fields>
                        </asp:DataPager>
                        </div>
                    </LayoutTemplate>
                </asp:ListView>
                <br/>
            </div>
    </div>
    </div>
    <div class="EventBox">
        <div class="slideHeader" id="slideHeader_pendingEvents" onclick="changeArrow(this.id);showHideContent(this.id);">
            <span>My Pending Events</span>
            <img src="VisualDesign/DropDownElements/expand_arrow.png" alt="" />
        </div>
       
        <div class="slideContainer" id="slideContainer_pendingEvents"> 
            <div class="slideContent"  id="slideContent_pendingEvents">
            <br/>
               <asp:ObjectDataSource ID="MyPendingEventsSource" runat="server" SelectMethod="GetMyPendingEvents"
                    TypeName="PresentationLayer.Profile"></asp:ObjectDataSource>
 <asp:ListView ID="ListView1" runat="server" DataSourceID="MyPendingEventsSource">
                    <ItemTemplate>
                        <tr class="TableRow"  onclick="viewevent('<%# Eval("idevent") %>')">
                            <td>
                               <p><%# Eval("Name") %> </p>
                               <p><asp:Label ID="Location" runat="server" Text="" idevent=<%# Eval("idevent") %>   OnPreRender="GetFinalLocation" ClientIDMode="Static" /></p>
                             
                            </td>
                            <td>
                                <p><asp:Label ID="Time" runat="server" Text="" idevent=<%# Eval("idevent") %>   OnPreRender="GetFinalTime" ClientIDMode="Static" /></p>
                                <p><asp:Label ID="Date" runat="server" Text="" idevent=<%# Eval("idevent") %>   OnPreRender="GetFinalDate" ClientIDMode="Static" /></p>
                             
                            </td>
                            <td>
                               <asp:Label ID="Invited" runat="server" Text='0' idevent=<%# Eval("idevent") %> OnPreRender="NumInvited" />
                            </td>
                            <td>
                                <asp:Label ID="Attend" runat="server" Text='0' idevent=<%# Eval("idevent") %> OnPreRender="NumAttending" />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <LayoutTemplate>
                    <div id="DataPagerContainerHeader">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="2">
                            <Fields>
                                <asp:NextPreviousPagerField PreviousPageText="<img src='VisualDesign/DropDownElements/button_GoUp_up.png' onMouseOver=this.src='VisualDesign/DropDownElements/button_GoUp_over.png'  onMouseOut=this.src='VisualDesign/DropDownElements/button_GoUp_up.png' />"
                                    ButtonType="Link" ShowNextPageButton="false" ShowPreviousPageButton="true" />
                            </Fields>
                        </asp:DataPager>
                        </div>
                        <table id="itemPlaceholderContainer" runat="server" class="EventTable" border="1">
                            <tr id="Tr1" runat="server" style="background-color: #DCDCDC; color: #000000;">
                                <th id="Th1" runat="server">
                                    <div class='ColumnTitle'>
                                        Name
                                    </div>
                                </th>
                                <th id="Th2" runat="server">
                                    <div class='ColumnTitle'>
                                        Details
                                    </div>
                                </th>
                                <th id="Th3" runat="server">
                                    <div class='ColumnTitle'>
                                        Inv
                                    </div>
                                </th>
                                <th id="Th4" runat="server">
                                    <div class='ColumnTitle'>
                                        Att
                                    </div>
                                </th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                        <div id="DataPagerContainerFooter"> 
                        <asp:DataPager ID="DataPager2" runat="server" PageSize="2">
                            <Fields>
                                <asp:NextPreviousPagerField NextPageText="<img runat='server' src='VisualDesign/DropDownElements/button_GoDown_up.png' onMouseOver=this.src='VisualDesign/DropDownElements/button_GoDown_over.png'  onMouseOut=this.src='VisualDesign/DropDownElements/button_GoDown_up.png' />"
                                    ButtonType="Link" ShowNextPageButton="true" ShowPreviousPageButton="false" />
                            </Fields>
                        </asp:DataPager>
                        </div>
                    </LayoutTemplate>
                </asp:ListView>
             <br/>
            </div>
    </div>
    </div>
    <div id="debugMessage" runat="server">
    </div>
</asp:Content>
